package com.night.student.config;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Mr.Wang
 * @ClassName: RedissionConfig
 * @Description: //TODO
 * @date: 2022/10/27-19:18
 */
@Configuration
public class RedissonConfig {
    @Bean
    public RedissonClient redissonClient(){
        Config config=new Config();
        config.useSingleServer().setAddress("redis://43.136.183.146:6382");
        config.useSingleServer().setPassword("ranzhihui1001");
        return Redisson.create(config);
    }
}
